#include <iostream>

using namespace std;

int gcd( int &a, int &b )
{
        while( 1 )
                {
                            int c = a % b;
                                    if( !c )
                                                    return b;
                                            a = b;
                                                    b = c;
                                                        }
}

int main(int argc, const char *argv[])
{
    int a, b;
    a = 7, b = 5;
    gcd(a, b);
    cout << "a:" << a << endl;
    cout << "b:" << b << endl;
    return 0;
}
